import { Application } from 'egg'
import { startup, seed } from './app/core'

export default (app: Application) => {
  app.beforeStart(async () => {
    app.logger.info('cluster master process beforeStart by /app.js')
    await startup(app)
    await seed(app)
    // await backup(app)
    app.logger.info(`>>>>>>  [${app.config.name}] is running at [${app.config.env}] <<<<<<`)
  })
}
